package com.choosefine.it.team.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;

import java.util.HashMap;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.choosefine.it.base.BaseController;
import com.choosefine.it.base.HttpServiceBean;
import com.choosefine.it.base.dto.DateDTO;
import com.choosefine.it.base.dto.PageDTO;
import com.choosefine.it.common.utils.URLHandlerUtils;
import com.choosefine.it.worker.vo.ShoppingOrderMaterielCountVO;

@RestController
@RequestMapping("/team/equipment")
/**
 * 12.3dzq 物料消耗
 * @author Administrator
 *
 */
@Api(value="物料消耗",description="董梓淇")
public class ShoppingEquipmentController extends BaseController{
	
	@Autowired
	HttpServiceBean httpServiceBean;
	
	@Value("#{yaml.get('shopping.order.head')}")
	private String orderHead;//订单
	@Value("#{yaml.get('shopping.order.itemDetail')}")
	private String itemDetail;//购买详细
	@Value("#{yaml.get('shopping.order.shop')}")
	private String orderShop;//商家
	@Value("#{yaml.get('shopping.order.materiel')}")
	private String orderMateriel;//购买订单商品大类
	
	@Value("#{yaml.get('shopping.order.leaseDetail')}")
	private String leaseDetail;//租赁详细
	@Value("#{yaml.get('shopping.order.leaseMateriel')}")
	private String leaseMateriel;//租赁订单商品大类
	@Value("#{yaml.get('shopping.order.payableCount')}")
	private String payableCount;//订单应付金额统计
	@Value("#{yaml.get('shopping.order.paidCount')}")
	private String paidCount;//订单已付金额
	@Value("#{yaml.get('shopping.order.total')}")
	private String orderTotal;
	@Value("#{yaml.get('shopping.order.totalDetail')}")
	private String totalDetail;
	@Value("#{yaml.get('shopping.order.shopCount')}")
	private String shopCount;
	@Value("#{yaml.get('shopping.order.materielCount')}")
	private String orderMaterielCount;
	@Value("#{yaml.get('shopping.order.receptionMaterielCount')}")
	private String receptionMaterielCount;
	
	
	
	
	/**
	 * app接口，用于查看设施设备材料的应付金额，已付金额,商家数量
	 * @return
	 */
	@ApiOperation(value="设施设备材料的应付金额，已付金额,商家数量")
	@ApiImplicitParams({
		@ApiImplicitParam(name="teamId",value="班组id",defaultValue="",required=false,dataType="Integer",paramType="query"),
		@ApiImplicitParam(name="projectCode",value="项目code",defaultValue="",required=false,dataType="Integer",paramType="query"),
		@ApiImplicitParam(name="merchandiseType",value="订单类型id：1材料2设施3设备",defaultValue="",required=true,dataType="Integer",paramType="query"),
	})
	@RequestMapping(value="/equipmentCount",method=RequestMethod.GET)
	public String equipmentCount(
			@RequestParam(value="teamId",defaultValue="") Integer teamId, 
			@RequestParam(value="projectCode",defaultValue="")String projectCode,
			@RequestParam(value="merchandiseType",defaultValue="")Integer merchandiseType
			) throws Exception{
		if(teamId==null&&"".equals(projectCode)){
			return responseFail("参数不合法");
		}
		if(merchandiseType==null){
			return responseFail("参数不合法");
		}
		String key="data";//http请求数据结果键
		Map<String, Object> map=new HashMap<String, Object>();//参数对象
		StringBuffer payableUrl= URLHandlerUtils.getUrlBuffer(shoppingURL,  payableCount);//应付金额
		StringBuffer paidUrl= URLHandlerUtils.getUrlBuffer(shoppingURL,  paidCount);//已付金额
		StringBuffer supplierNumberUrl= URLHandlerUtils.getUrlBuffer(shoppingURL,  shopCount);//商家总数
		map.put("teamId",teamId);
		map.put("projectCode", projectCode);
		map.put("merchandiseType", merchandiseType);
		httpServiceBean.urlFormat(payableUrl, map);//转换为url
		httpServiceBean.urlFormat(paidUrl, map);//转换为url
		httpServiceBean.urlFormat(supplierNumberUrl, map);//转换为url
		Map<String, Object> resultMap=new HashMap<>();//返回结果
		//httpServiceBean.resultJsonFormat：返回结果取值处理
		resultMap.put("payable", httpServiceBean.numberResultJsonFormat(
				httpServiceBean.getRequestBody(payableUrl.toString(), null), key));
		resultMap.put("paid", httpServiceBean.numberResultJsonFormat(
				httpServiceBean.getRequestBody(paidUrl.toString(), null), key));
		resultMap.put("supplierNumber", httpServiceBean.numberResultJsonFormat(
				httpServiceBean.getRequestBody(supplierNumberUrl.toString(), null), key));
		return responseSuccess(resultMap);
	}
	
	
	/**
	 * 12.3dzq 查看订单详情
	 * @param id
	 * @return
	 * @throws Exception
	 */
	@ApiOperation(value="订单详情（商城）")
	@ApiImplicitParam(name="orderId",value="订单id",required=true,dataType="Integer",paramType="path")
	@RequestMapping(value="/{orderId}",method=RequestMethod.GET)
	public String selectById(@PathVariable("orderId")Integer id) throws Exception{
		StringBuffer url= URLHandlerUtils.getUrlBuffer(shoppingURL,  orderHead).append("/").append(id);
		String s=httpServiceBean.getRequestBody(url.toString(), null);
		return s;
	}
	
	
	/**
	 * 12.5 dzq 查看物料消耗大类
	 */
	@ApiOperation(value="获取类型订单集合（商城）",response=ShoppingOrderMaterielCountVO.class)
	@ApiImplicitParams({
		@ApiImplicitParam(name="teamId",value="班组id",defaultValue="",required=false,dataType="Integer",paramType="query"),
		@ApiImplicitParam(name="shopId",value="商家id",defaultValue="",required=false,dataType="Integer",paramType="query"),
		@ApiImplicitParam(name="projectCode",value="项目code",defaultValue="",required=false,dataType="String",paramType="query"),
		@ApiImplicitParam(name="merchandiseType",value="订单类型id：1材料2设施3设备",defaultValue="",required=true,dataType="Integer",paramType="query"),
		@ApiImplicitParam(name="categoryName",value="商品种类名",defaultValue="",required=false,dataType="String",paramType="query"),
		@ApiImplicitParam(name="buyType",value="订单类型1购买2租赁",defaultValue="",required=true,dataType="Integer",paramType="query"),
		@ApiImplicitParam(name="startTime",value="开始时间",defaultValue="",required=false,dataType="long",paramType="query"),
		@ApiImplicitParam(name="endTime",value="结束时间",defaultValue="",required=false,dataType="long",paramType="query"),
		@ApiImplicitParam(name="pageNum",value="起始页",defaultValue="",required=false,dataType="Integer",paramType="query"),
		@ApiImplicitParam(name="pageSize",value="每页行",defaultValue="",required=false,dataType="Integer",paramType="query")
	})
	@RequestMapping(value="/element",method=RequestMethod.GET)
	public String selectEquipment(
			@RequestParam(value="teamId",defaultValue="") Integer teamId, 
			@RequestParam(value="projectCode",defaultValue="") String projectCode,
			@RequestParam(value="shopId",defaultValue="") Integer shopId,
			@RequestParam(value="merchandiseType",defaultValue="")Integer merchandiseType,
			@RequestParam(value="categoryName",defaultValue="")String categoryName,
			@RequestParam(value="buyType",defaultValue="") Integer buyType,
			DateDTO date,
			PageDTO page) throws Exception{
		if(teamId==null&&"".equals(projectCode)){
			return responseFail("参数不合法");
		}
		if(merchandiseType==null||buyType==null){
			return responseFail("参数不合法");
		}
		if(!timeJudge(date)){
			return responseFail("时间参数不合法");
		}
		if(buyType==null||buyType<1||buyType>2){
			return responseFail("参数不合法");
		}
		if(buyType==2&&merchandiseType==1){
			return responseFail("参数不合法：材料无租赁 ");
		}
		StringBuffer url= null;
		if(buyType==1){
			url = URLHandlerUtils.getUrlBuffer(shoppingURL,  orderMateriel);
		}
		else if(buyType==2){
			url = URLHandlerUtils.getUrlBuffer(shoppingURL,  leaseMateriel);
		}
		Map<String, Object> map=new HashMap<String,Object>();
		map.put("teamId",teamId );
		map.put("shopId",shopId );
		map.put("merchandiseType",merchandiseType );
		map.put("categoryName",categoryName );
		map.put("projectCode",projectCode );
		httpServiceBean.shopUrlFormat(url, map, page, date);
		String result=httpServiceBean.getRequestBody(url.toString(), null);
		return result;
	}
	
	/**
	 * 12.8 dzq 查看物料消耗小类交易列表(根据商品种类id查看)
	 */
	@ApiOperation(value="获取类型订单集合详情（商城）")
	@ApiImplicitParams({
		@ApiImplicitParam(name="projectCode",value="项目code",defaultValue="",required=false,dataType="String",paramType="query"),
		@ApiImplicitParam(name="teamId",value="班组id",defaultValue="",required=false,dataType="Integer",paramType="query"),
		@ApiImplicitParam(name="shopId",value="商家id",defaultValue="",required=false,dataType="Integer",paramType="query"),
		@ApiImplicitParam(name="categoryId",value="商品种类id",defaultValue="",required=true,dataType="Integer",paramType="query"),
		@ApiImplicitParam(name="buyType",value="订单类型1购买2租赁",defaultValue="",required=true,dataType="Integer",paramType="query"),
		@ApiImplicitParam(name="startTime",value="开始时间",defaultValue="",required=false,dataType="long",paramType="query"),
		@ApiImplicitParam(name="endTime",value="结束时间",defaultValue="",required=false,dataType="long",paramType="query"),
		@ApiImplicitParam(name="pageNum",value="起始页",defaultValue="",required=false,dataType="Integer",paramType="query"),
		@ApiImplicitParam(name="pageSize",value="每页行",defaultValue="",required=false,dataType="Integer",paramType="query")
	})
	@RequestMapping(value="/elementInfo",method=RequestMethod.GET)
	public String selectEquipmentInfoList(
			@RequestParam(value="projectCode",defaultValue="") String projectCode,
			@RequestParam(value="teamId",defaultValue="") Integer teamId, 
			@RequestParam(value="shopId",defaultValue="") Integer shopId,
			@RequestParam(value="categoryId",defaultValue="")Integer categoryId,
			@RequestParam(value="buyType",defaultValue="") Integer buyType,
			DateDTO date,
			PageDTO page) throws Exception{
		if(teamId==null&&"".equals(projectCode)){
			return responseFail("参数不合法");
		}
		if(categoryId==null||buyType==null){
			return responseFail("参数不合法");
		}
		if(!timeJudge(date)){
			return responseFail("时间参数不合法");
		}
		if(buyType==null||buyType<1||buyType>2){
			return responseFail("参数不合法");
		}
		StringBuffer url = null;
		if(buyType==1){//查看购买
			url = URLHandlerUtils.getUrlBuffer(shoppingURL,  itemDetail);
		}
		else if(buyType==2){//查看租赁
			url = URLHandlerUtils.getUrlBuffer(shoppingURL,  leaseDetail);
		}
		Map<String, Object> map=new HashMap<String,Object>();
		map.put("projectCode",projectCode);
		map.put("teamId",teamId );
		map.put("shopId", shopId);
		map.put("categoryId",categoryId);
		httpServiceBean.shopUrlFormat(url, map, page, date);
		String result=httpServiceBean.getRequestBody(url.toString(), null);
		return result;
	}
	
	/**
	 * 12.5 dzq 总应付价格
	 */
	@ApiOperation(value="应付总价格（商城）")
	@ApiImplicitParams({
		@ApiImplicitParam(name="teamId",value="班组id",defaultValue="",required=true,dataType="Integer",paramType="query"),
		@ApiImplicitParam(name="projectCode",value="项目code",defaultValue="",required=false,dataType="Integer",paramType="query"),
		@ApiImplicitParam(name="merchandiseType",value="订单类型id：1材料2设施3设备",defaultValue="",required=true,dataType="Integer",paramType="query"),
	})
	@RequestMapping(value="/payableCount",method=RequestMethod.GET)
	public String selectPayableCount(
			@RequestParam(value="teamId",defaultValue="") Integer teamId, 
			@RequestParam(value="projectCode",defaultValue="")String projectCode,
			@RequestParam(value="merchandiseType",defaultValue="")Integer merchandiseType
			) throws Exception{
		if(teamId==null&&"".equals(projectCode)){
			return responseFail("参数不合法");
		}
		if(merchandiseType==null){
			return responseFail("参数不合法");
		}
		Map<String, Object> map= new HashMap<String, Object>();
		map.put("teamId", teamId);
		map.put("projectCode",projectCode);
		map.put("merchandiseType", merchandiseType);
		StringBuffer url= URLHandlerUtils.getUrlBuffer(shoppingURL,  payableCount);
		httpServiceBean.urlFormat(url, map);
		String result=httpServiceBean.getRequestBody(url.toString(), null);
		return result;
	}
	
	/**
	 * 12.5 dzq 以付总价格
	 */
	@ApiOperation(value="以付总价格（商城）")
	@ApiImplicitParams({
		@ApiImplicitParam(name="teamId",value="班组id",defaultValue="",required=false,dataType="Integer",paramType="query"),
		@ApiImplicitParam(name="projectCode",value="项目code",defaultValue="",required=false,dataType="Integer",paramType="query"),
		@ApiImplicitParam(name="merchandiseType",value="订单类型id：1材料2设施3设备",defaultValue="",required=true,dataType="Integer",paramType="query"),
	})
	@RequestMapping(value="/paidCount",method=RequestMethod.GET)
	public String selectPaidCount(
			@RequestParam(value="teamId",defaultValue="") Integer teamId, 
			@RequestParam(value="projectCode",defaultValue="")String projectCode,
			@RequestParam(value="merchandiseType",defaultValue="")Integer merchandiseType
			) throws Exception{
		if(teamId==null&&"".equals(projectCode)){
			return responseFail("参数不合法");
		}
		if(merchandiseType==null){
			return responseFail("参数不合法");
		}
		Map<String, Object> map=new HashMap<String, Object>();
		StringBuffer url=new StringBuffer(paidCount);
		map.put("teamId",teamId);
		map.put("projectCode", projectCode);
		map.put("merchandiseType", merchandiseType);
		httpServiceBean.urlFormat(url, map);
		String result=httpServiceBean.getRequestBody(url.toString(), null);
		return result;
	}
	
	/***
	 * 12.5dzq 返回商家列表
	 */
	@ApiOperation(value="返回交易过的商家列表(商城)")
	@ApiImplicitParams({
		@ApiImplicitParam(name="teamId",value="班组id",defaultValue="",required=true,dataType="Integer",paramType="query"),
		@ApiImplicitParam(name="projectCode",value="项目Code",defaultValue="",required=true,dataType="Integer",paramType="query")
	})
	
	@RequestMapping(value="/supplier",method=RequestMethod.GET)
	public String supplier (
			@RequestParam(value="teamId",defaultValue="") Integer teamId,
			@RequestParam(value="projectCode",defaultValue="") String projectCode
			)throws Exception{
		if(teamId==null&&"".equals(projectCode)){
			return responseFail("参数不合法");
		}
		StringBuffer url = URLHandlerUtils.getUrlBuffer(shoppingURL,  orderShop);
		Map<String, Object> map=new HashMap<String, Object>();
		map.put("teamId", teamId);
		map.put("projectCode", projectCode);
		
		String result=httpServiceBean.getRequestBody(url.toString(), null);
		return result;
	}
	
	
	/***
	 * 12.10dzq 供应商交易金额列表
	 */
	@ApiOperation(value="供应商交易金额列表")
	@ApiImplicitParams({
		@ApiImplicitParam(name="teamId",value="班组id",defaultValue="",required=false,dataType="Integer",paramType="query"),
		@ApiImplicitParam(name="projectCode",value="项目code",defaultValue="",required=false,dataType="String",paramType="query"),
		@ApiImplicitParam(name="shopId",value="供应商id",defaultValue="",required=false,dataType="Integer",paramType="query"),
		@ApiImplicitParam(name="pageNum",value="起始页",defaultValue="",required=false,dataType="Integer",paramType="query"),
		@ApiImplicitParam(name="pageSize",value="每页条",defaultValue="",required=false,dataType="Integer",paramType="query")
	})
	@GetMapping(value="/supplierAmount")
	public String supplier(
			@RequestParam(value="teamId",defaultValue="")Integer teamId,
			@RequestParam(value="projectCode",defaultValue="")String projectCode,
			@RequestParam(value="shopId",defaultValue="")String shopId,
			PageDTO page
			)throws Exception{
		if(teamId==null&&"".equals(projectCode)){
			return responseFail("参数不合法");
		}
		StringBuffer url= URLHandlerUtils.getUrlBuffer(shoppingURL,  orderTotal);
		Map<String, Object> map=new HashMap<String, Object>();
		map.put("teamId",teamId );
		map.put("projectCode",projectCode );
		map.put("shopId", shopId);
		httpServiceBean.shopUrlFormat(url, map, page, null);
		String result=httpServiceBean.getRequestBody(url.toString(), null);
		return result;
	}
	
	
	/***
	 * 12.12dzq 供应商数量
	 */
	@ApiOperation(value="供应商数量(商城)",response=Integer.class)
	@ApiImplicitParams({
		@ApiImplicitParam(name="teamId",value="班组id",defaultValue="",required=false,dataType="Integer",paramType="query"),
		@ApiImplicitParam(name="projectCode",value="项目code",defaultValue="",required=false,dataType="String",paramType="query"),
		@ApiImplicitParam(name="merchandiseType",value="1材料，2设备，3设施",defaultValue="",required=false,dataType="Integer",paramType="query"),
		@ApiImplicitParam(name="startTime",value="开始时间",defaultValue="",required=false,dataType="long",paramType="query"),
		@ApiImplicitParam(name="endTime",value="结束时间",defaultValue="",required=false,dataType="long",paramType="query")
	})
	@RequestMapping(value="/supplierNumber",method=RequestMethod.GET)
	public String supplierNumber (
			@RequestParam(value="teamId",defaultValue="") Integer teamId,
			@RequestParam(value="projectCode",defaultValue="") String projectCode,
			@RequestParam(value="merchandiseType",defaultValue="")String merchandiseType,
			DateDTO date
			)throws Exception{
		if(teamId==null&&"".equals(projectCode)){
			return responseFail("参数不合法");
		}
		if(!timeJudge(date)){
			return responseFail("时间参数不合法");
		}
		StringBuffer url= URLHandlerUtils.getUrlBuffer(shoppingURL,  shopCount);
		Map<String, Object> map=new HashMap<String, Object>();
		map.put("teamId",teamId );
		map.put("projectCode",projectCode );
		map.put("merchandiseType",merchandiseType );
		httpServiceBean.shopUrlFormat(url, map, null, date);
		String result=httpServiceBean.getRequestBody(url.toString(), null);
		return result;
	}
	
	/**
	 * 12.15dzq 购买，租赁，钱，天
	 */
	@ApiOperation(value="购买，租赁的数量，金额，天数(商城)")
	@ApiImplicitParams({
		@ApiImplicitParam(name="teamId",value="班组id",defaultValue="",required=false,dataType="Integer",paramType="query"),
		@ApiImplicitParam(name="shopId",value="商家id",defaultValue="",required=false,dataType="Integer",paramType="query"),
		@ApiImplicitParam(name="projectCode",value="项目code",defaultValue="",required=false,dataType="String",paramType="query"),
		@ApiImplicitParam(name="merchandiseType",value="订单类型id：1材料2设施3设备",required=true,dataType="Integer",paramType="query"),
		@ApiImplicitParam(name="categoryName",value="商品种类名",defaultValue="",required=false,dataType="String",paramType="query"),
		@ApiImplicitParam(name="buyType",value="订单类型1购买2租赁",defaultValue="",required=true,dataType="Integer",paramType="query"),
		@ApiImplicitParam(name="startTime",value="开始时间",defaultValue="",required=false,dataType="long",paramType="query"),
		@ApiImplicitParam(name="endTime",value="结束时间",defaultValue="",required=false,dataType="long",paramType="query")
	})
	@RequestMapping(value="/elementSum",method=RequestMethod.GET)
	public String select(
			@RequestParam(value="teamId",defaultValue="") Integer teamId, 
			@RequestParam(value="projectCode",defaultValue="") String projectCode,
			@RequestParam(value="shopId",defaultValue="") Integer shopId,
			@RequestParam(value="merchandiseType",defaultValue="")Integer merchandiseType,
			@RequestParam(value="categoryName",defaultValue="")String categoryName,
			@RequestParam(value="buyType",defaultValue="") Integer buyType,
			DateDTO date) throws Exception{
		if(teamId==null&&"".equals(projectCode)){
			return responseFail("参数不合法");
		}
		if(merchandiseType==null||buyType==null){
			return responseFail("参数不合法");
		}
		if(!timeJudge(date)){
			return responseFail("时间参数不合法");
		}
		if(buyType==null||buyType<1||buyType>2){
			return responseFail("参数不合法");
		}
		if(buyType==2&&merchandiseType==1){
			return responseFail("参数不合法：材料无租赁 ");
		}
		StringBuffer url= null;
		if(buyType==1){
			url = URLHandlerUtils.getUrlBuffer(shoppingURL,  orderMaterielCount);
		}
		else if(buyType==2){
			url = URLHandlerUtils.getUrlBuffer(shoppingURL,  receptionMaterielCount);
		}
		Map<String, Object> map=new HashMap<String, Object>();
		map.put("teamId",teamId );
		map.put("shopId",shopId );
		map.put("merchandiseType",merchandiseType );
		map.put("categoryName",categoryName );
		map.put("projectCode",projectCode );
		httpServiceBean.shopUrlFormat(url, map, null, date);
		String result=httpServiceBean.getRequestBody(url.toString(), null);
		return result;
	}
	
	
	
	/***
	 * 12.10dzq 供应商交易列表二级详细列表
	 */
	@ApiOperation(value="供应商交易列表二级详细列表(商城)")
	@ApiImplicitParams({
		@ApiImplicitParam(name="teamId",value="班组id",defaultValue="",required=false,dataType="Integer",paramType="query"),
		@ApiImplicitParam(name="projectCode",value="项目code",defaultValue="",required=false,dataType="String",paramType="query"),
		@ApiImplicitParam(name="shopId",value="供应商id",defaultValue="",required=false,dataType="Integer",paramType="query"),
		@ApiImplicitParam(name="pageNum",value="起始页",defaultValue="",required=false,dataType="Integer",paramType="query"),
		@ApiImplicitParam(name="pageSize",value="每页条",defaultValue="",required=false,dataType="Integer",paramType="query")
	})
	
	@RequestMapping(value="/supplierDetail",method=RequestMethod.GET)
	public String supplierDetail (
			@RequestParam(value="teamId",defaultValue="") Integer teamId,
			@RequestParam(value="projectCode",defaultValue="") String projectCode,
			@RequestParam(value="shopId",defaultValue="")String shopId,
			PageDTO page
			)throws Exception{
		if(teamId==null&&"".equals(projectCode)){
			return responseFail("参数不合法");
		}
		StringBuffer url= URLHandlerUtils.getUrlBuffer(shoppingURL,  totalDetail);
		Map<String, Object> map= new HashMap<String, Object>();
		map.put("teamId", teamId);
		map.put("projectCode", projectCode);
		map.put("shopId", shopId);
		httpServiceBean.shopUrlFormat(url, map, page, null);
		String result=httpServiceBean.getRequestBody(url.toString(), null);
		return result;
	}
	
	
	/**
	 * 12.15dzq 实收数量
	 */
	@GetMapping("/received")
	@ApiOperation(value="实收数量(商城)")
	@ApiImplicitParams({
		@ApiImplicitParam(name="teamId",value="班组id",defaultValue="",required=false,dataType="Integer",paramType="query"),
		@ApiImplicitParam(name="shopId",value="商家id",defaultValue="",required=false,dataType="Integer",paramType="query"),
		@ApiImplicitParam(name="projectCode",value="项目code",defaultValue="",required=false,dataType="String",paramType="query"),
		@ApiImplicitParam(name="merchandiseType",value="订单类型id：1材料2设施3设备",required=true,dataType="Integer",paramType="query"),
		@ApiImplicitParam(name="categoryId",value="商品种类Id",defaultValue="",required=true,dataType="Integer",paramType="query"),
		@ApiImplicitParam(name="buyType",value="订单类型1购买2租赁",defaultValue="",required=true,dataType="Integer",paramType="query"),
		@ApiImplicitParam(name="startTime",value="开始时间",defaultValue="",required=false,dataType="long",paramType="query"),
		@ApiImplicitParam(name="endTime",value="结束时间",defaultValue="",required=false,dataType="long",paramType="query")
	})
	public String received(	
			@RequestParam(value="teamId",defaultValue="") Integer teamId, 
			@RequestParam(value="projectCode",defaultValue="") String projectCode,
			@RequestParam(value="shopId",defaultValue="") Integer shopId,
			@RequestParam(value="merchandiseType",defaultValue="")Integer merchandiseType,
			@RequestParam(value="categoryId",defaultValue="")Integer categoryId,
			@RequestParam(value="buyType",defaultValue="") Integer buyType,
			DateDTO date){
		int result=11;//12.15dzq 由于商城组暂时没有提供，所以写个死数据给前端用
		return responseSuccess(result);
	}
	
}
